import request from '@/utils/request'

export function fetchTaskList(listQuery) {
  return request({
    url: '/task/list',
    method: 'get',
    params: {
      page:listQuery.page,
      limit:listQuery.limit
    }
  })
}

export function fetchTaskById(id) {
  return request({
    url: `/task/${id}`,
    method: 'get',
  })
}


export function createTask(temp) {
  return request({
    url: '/task/create',
    method: 'post',
    data:temp
  })
}

export function updateTask(temp) {
  return request({
    url: '/task/update',
    method: 'post',
    data:temp
  })
}
